package com.zjnx.train.service.impl;

import java.util.List;

import com.zjnx.train.dao.UserDao;
import com.zjnx.train.entity.User;
import com.zjnx.train.service.UserService;

/**
 * @author foo
 * @email foo@zjnx.com
 * @description:service接口实现
 */
public class UserServiceImpl implements UserService {
  private UserDao userDao;

  public void setUserDao(UserDao userDao) {
    this.userDao = userDao;
  }

  @Override
  public void save(User user) {
    userDao.save(user);
  }

  @Override
  public void update(User user) {
    userDao.update(user);
  }

  @Override
  public void delete(Long id) {
    userDao.delete(id);
  }

  @Override
  public User findByKey(Long id) {
    return userDao.findByKey(id);
  }

  @Override
  public List<User> findAll() {
    return userDao.findAll();
  }

}
